package com.qf.pojo;

/**
 * @author 高圆圆
 * @date 2023/4/24 15:56
 * 购物项实体
 */
public class CartItem {
    private Product product ;//商品实体
    private int  count ;     //商品数量
    private double subTotal ;//小计金额

    public CartItem() {
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    //获取到小计金额
    public double getSubTotal() {
        return product.getShop_price() * count;
    }

   /* public void setSubTotal(double subTotal) {
        this.subTotal = subTotal;
    }*/
}
